<template>
	<view :class="[primarySize()]">
		<view class="recomd_item" v-for="(item,index) in resumes" @click="resumeDetail(item.id)">
			<view class="flex-box">
				<view class="flex-grow-1 col3 fs32 lh44">
					{{item.personal.realname}}<text class="pl10 col9 fs26">| {{item.personal.age}}岁</text>
				</view>
				<view class="fs24 col9">{{formatDatetime(item.updatetime,'yyyy-mm-dd')}}</view>
			</view>
			<view class="fs24 col3 lh32 mt10">期望薪资:<text
					class="col8 fs28 lh32 fwb">{{item.job_intention.expect_salary.name}}/月</text>
			</view>
			<view class="clearfix m-ellipsis">
				<view class="label">{{item.personal.work_experience.name}}</view>
				<view class="label">{{item.personal.education_level.name}}</view>
			</view>
			<view class="mt30 pt20 bt flex-box fs24 col3">
				<image src="@/static/public/icon45.png" mode="widthFix" class="ico30"></image>
				<view class="flex-grow-1 plr5">求职意向: {{item.job_intention.fav_category.category_name}}</view>
				<image src="@/static/public/icon_address2.png" mode="widthFix" class="ico24"></image>
				<view class="pl5">意向区域:{{item.job_intention.fav_city.shortname}}</view>
			</view>
			<view class="recom_btn flex-box mt30" v-if="showFav">
				<button @click="unfav" hover-class="none" class="flex-grow-1">取消收藏</button>
				<button @click="createInterview" hover-class="none" class="flex-grow-1 invite">面试邀请</button>
			</view>
		</view>
	</view>
</template>

<script>
	const app = getApp();
	export default {
		name: "resume-list",
		props: {
			resumes: {
				type: Array,
				default: []
			},
			showFav: {
				type: Boolean,
				default: false
			}
		},
		data() {
			return {
				
			};
		},
		created() {
			let page = this;
		},
		methods: {
			resumeDetail(id) {
				uni.navigateTo({
					url: "/pages/company/talent_details?id=" + id
				})
			}
		}
	}
</script>

<style lang="scss" scoped>
	.recomd_item {
		padding: 25rpx 30rpx 20rpx;
		width: 690rpx;
		background: #FFFFFF;
		border-radius: 18rpx;
		margin-top: 20rpx;

		.label {
			display: inline-block;
			vertical-align: top;
			height: 38rpx;
			background: #F7F7F7;
			border-radius: 4rpx;
			line-height: 38rpx;
			text-align: center;
			font-size: 20rpx;
			color: #A5A5A5;
			padding: 0 14rpx;
			margin-top: 20rpx;
			margin-right: 18rpx;
		}

		.bt {
			border-top: 1px solid #eee;
		}
	}

	.primary_orange {
		.recomd_item {
			padding: 25rpx 30rpx 20rpx;
			width: 690rpx;
			background: #FFFFFF;
			border-radius: 18rpx;
			margin-top: 20rpx;
			box-shadow: 0px 1px 18px 0px rgba(0, 0, 0, 0.06);

			.label {
				display: inline-block;
				vertical-align: top;
				height: 38rpx;
				background: #F7F7F7;
				border-radius: 4rpx;
				line-height: 38rpx;
				text-align: center;
				font-size: 20rpx;
				color: #A5A5A5;
				padding: 0 14rpx;
				margin-top: 20rpx;
				margin-right: 18rpx;
			}

			.bt {
				border-top: 1px solid #eee;
			}
		}
	}

	.recom_btn {
		border-top: 1rpx solid #F6F6F6
	}

	.recom_btn button {
		line-height: 88rpx;
		height: 88rpx;
		color: #999999;
		font-size: 24rpx;
	}

	.recom_btn .invite {
		color: var(--primary);
		position: relative
	}

	.recom_btn .invite::after {
		content: '';
		position: absolute;
		left: 0;
		top: 50%;
		transform: translateY(-50%);
		width: 1rpx;
		height: 22rpx;
		background-color: #F3F3F3;
		display: block
	}
</style>